package org.lee.basic.algorithm;

/**
 * @author jackielee
 * @version 1.0
 * @description Lotus1
 * @date 2021/4/19
 */
public class Lotus1 {
  public static void main(String[] args) {
    /** 水仙花数：百位立方+十位立方+个位立方=本身 */
    for (int i = 100; i < 1000; ++i) {
      int h = i / 100;
      int t = (i - h) / 10 % 10;
      int s = i % 10;
      if (Math.pow(h, 3) + Math.pow(t, 3) + Math.pow(s, 3) == i) {
        System.out.println(i + " is Lotus number.");
      }
    }
  }
}
